package com.chatplus.application.domain.entity.functions;

import com.baomidou.mybatisplus.annotation.*;
import com.chatplus.application.datasource.handler.JacksonJsonTypeHandler;
import com.chatplus.application.datasource.id.IdEntity;
import com.chatplus.application.domain.dto.FunctionParametersDto;
import org.apache.ibatis.type.Alias;

/**
 * <p>Table: t_function - 函数插件表</p>
 *
 * @author developer
 */
@Alias("function")
@TableName(value = "t_function", autoResultMap = true)
public class FunctionEntity extends IdEntity {

    /**
     * 函数名称
     */
    private String name;
    /**
     * 函数标签
     */
    private String label;
    /**
     * 函数描述
     */
    private String description;
    /**
     * 函数参数（JSON）
     */
    @TableField(typeHandler = JacksonJsonTypeHandler.class)
    private FunctionParametersDto parameters;
    /**
     * 函数处理 API
     */
    private String action;
    /**
     * 是否启用
     */
    private Boolean enabled;
    /**
     * API授权token
     */
    private String token;

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name =  name;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description =  description;
    }

    public FunctionParametersDto getParameters() {
        return this.parameters;
    }

    public void setParameters(FunctionParametersDto parameters) {
        this.parameters =  parameters;
    }
    public String getAction() {
        return this.action;
    }

    public void setAction(String action) {
        this.action =  action;
    }

    public Boolean getEnabled() {
        return this.enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled =  enabled;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}
